home *** CD-ROM | disk | FTP | other *** search
/ Computer Select (Limited Edition) / Computer Select.iso / pcc / v04n11 / batch1.exe / SHORTCUT.BAT < prev    next >
Encoding:
DOS Batch File  |  1991-09-17  |  843 b   |  29 lines

  1. @ECHO OFF
  2. REM This is SHORTCUT.BAT
  3. REM Adapted from J. Kevin Wells in PC Magazine V9 N12 
  4. IF %1!==! GOTO OOPS
  5. IF EXIST \BATCH\*.* GOTO START
  6. MD \BATCH
  7. :START
  8. SET OP=%PROMPT%
  9. ECHO PROMPT CD $P > T1.BAT
  10. COMMAND /C T1 > T2.BAT
  11. ECHO @ECHO OFF > \BATCH\%1.BAT
  12. FIND /V "$" T2.BAT | FIND /V "--" >> \BATCH\%1.BAT
  13. PROMPT=%OP%
  14. DEL T?.BAT
  15. ECHO Now you'll be able to type %1 at the DOS prompt
  16. ECHO to switch quickly into this subdirectory
  17. GOTO END
  18. :OOPS
  19. ECHO To create a shortcut command that will let you
  20. ECHO jump instantly into this subdirectory from any
  21. ECHO other directory, enter a shortcut name 8 or
  22. ECHO fewer characters long after the %0.
  23. ECHO.
  24. ECHO So if you want to CD into this subdirectory by 
  25. ECHO typing just HOT at the DOS prompt, enter %0 HOT
  26. ECHO.
  27. ECHO Be sure your PATH includes a \BATCH subdirectory!
  28. :END
  29.